/**
 * Created by mantoo on 2018/4/19.
 */
var myChart = echarts.init(document.getElementById('indexChart'));
var option = {
    title: {
        text: '各网站数据量增长图'
    },
    tooltip : {
        trigger: 'axis',
        axisPointer: {
            type: 'cross',
            label: {
                backgroundColor: '#6a7985'
            }
        }
    },
    legend: {
        data:['拉钩网','51Job','小米招聘','智联招聘','猎聘网']
    },
    toolbox: {
        feature: {
            saveAsImage: {}
        }
    },
    grid: {
        left: '3%',
        right: '4%',
        bottom: '3%',
        containLabel: true
    },
    xAxis : [
        {
            type : 'category',
            boundaryGap : false,
            data : ['周一','周二','周三','周四','周五','周六','周日']
        }
    ],
    yAxis : [
        {
            type : 'value'
        }
    ],
    series : [
        {
            name:'拉钩网',
            type:'line',
            stack: '总量',
            areaStyle: {normal: {}},
            data:[120, 132, 101, 134, 90, 230, 210]
        },
        {
            name:'猎聘网',
            type:'line',
            stack: '总量',
            areaStyle: {normal: {}},
            data:[220, 182, 191, 234, 290, 330, 310]
        },
        {
            name:'小米招聘',
            type:'line',
            stack: '总量',
            areaStyle: {normal: {}},
            data:[150, 232, 201, 154, 190, 330, 410]
        },
        {
            name:'智联招聘',
            type:'line',
            stack: '总量',
            areaStyle: {normal: {}},
            data:[894, 950, 966, 1154, 3450, 5100, 6000]
        },
        {
            name:'51Job',
            type:'line',
            stack: '总量',
            label: {
                normal: {
                    show: true,
                    position: 'top'
                }
            },
            areaStyle: {normal: {}},
            data:[1000, 2032, 4150, 4910, 5300, 7055, 9960]
        }
    ]
};
myChart.setOption(option);